﻿using System.Web.Mvc;
using N2.Web;
using N2.Web.Mvc;
using Dinamico.Models;

namespace Shop.Cms.Controllers
{
    /// <summary>
    /// This controller returns a view that displays the item created via the management interface
    /// </summary>
    [Controls(typeof(DescribePageModel))]
    public class DescribePageController : ContentController<DescribePageModel>
    {
        public override ActionResult Index()
        {
            // Right-click and Add View..
            //SetPageTitleDescriptionAndKeywords(CurrentItem.Keywords);
            return View(CurrentItem); // Passing the current content item is optional
        }

        // such thing does not work
        //private void SetPageTitleDescriptionAndKeywords(string desc)
        //{

        //    ViewData[PageTitle]=ViewData[PageTitle]+desc;
        //    ViewData[PageKeywords]=desc;
        //    ViewData[PageDescription]=desc;
        //}

        //public const string PageTitle = "PageTitle";
        //public const string PageKeywords = "PageKeywords";
        //public const string PageDescription = "PageDescription";
        //public const string PageTopic = "PageTopic";

    }
}